<?php

namespace App\Http\Verification\Admin;

use Illuminate\Foundation\Http\FormRequest;

class Login extends FormRequest
{
    public function authorize()
    {
        return true;
    }

    public function rules()
    {
        $rules = [
            'username' => 'required |between:5,32',
            'password'=>'string|between:6,32',
        ];
        return $rules;
    }

    public function messages()
    {
        $message = [
            'username.required'      =>'用户名必填',
            'username.between'      =>'账号在5到32位数之间',
            'password.required'      =>'密码必填',
            'password.between'      =>'密码在6到32位数之间',
        ];
        return $message;
    }

}